import datetime
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from applications.extensions import db


class FiresimModel(db.Model):
    __tablename__ = 'admin_fire_sim'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='用户ID')
    username = db.Column(db.String(20), comment='用户名')
    enable = db.Column(db.Integer, default=0, comment='启用')
    dept_id = db.Column(db.Integer, comment='部门id')
    update_at = db.Column(db.DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now, comment='创建时间')
    status_bloodpressurepre = db.Column(db.Integer, comment='前血压')
    status_bloodpressurenow = db.Column(db.Integer, comment='现血压')
    status_heartratepre = db.Column(db.Integer, comment='前心率')
    status_heartratenow = db.Column(db.Integer, comment='现心率')